/*
Author: yang_wanjun
Create: 2011/05/12
Update: 2011/05/12
 */
function Senbz() {
	this.validator = new Validator();
	this.comment = new Comment();
	this.operation = new Operation();
	this.utils = new Utils();
	this.cookie = new Cookie();
}

function Validator() {
}
function Comment() {
}
function Operation() {
}
function Utils() {
}
function Cookie() {
}
var senbz = new Senbz()

Senbz.prototype.delete_confirm = function(name) {
	var message = "确定真的要删除！ ";
	if (name) {
		message = "确定要删除 \"" + name + "\" 吗?";
	}
	if (window.confirm(message)) {
		return true;
	}
	return false;
}

Senbz.prototype.hide_sidebar = function(){
	var isSidebarHided = senbz.cookie.get_cookie("isSidebarHided");
	if (isSidebarHided == '' || isSidebarHided == 'N'){
		$('#body').removeClass('blogstyle').addClass('blogstyle2');
		senbz.cookie.set_cookie("isSidebarHided", "Y");
	}
	else{
		$('#body').removeClass('blogstyle2').addClass('blogstyle');
		senbz.cookie.set_cookie("isSidebarHided", "N");
	}
}

Senbz.prototype.init_sidebar = function(){
	var isSidebarHided = senbz.cookie.get_cookie("isSidebarHided");
	if (isSidebarHided == '' || isSidebarHided == 'N'){
		$('#body').removeClass('blogstyle2').addClass('blogstyle');
	}
	else{
		$('#body').removeClass('blogstyle').addClass('blogstyle2');
	}
}